<%--
  Created by IntelliJ IDEA.
  User: Iurii_Miedviediev
  Date: 9/12/2014
  Time: 12:08 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<html>
<body>
<!-- Header -->
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class="navbar-brand" href="/">Web-Library</a>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div>
            <ul class="nav navbar-nav navbar-right">
                <sec:authorize access="isAuthenticated()">
                    <li>
                        <a href="/cart"><img width="20px" height="20px" src="/img/cart.png"/></a>
                    </li>
                </sec:authorize>
                <li>
                    <a href="#">About</a>
                </li>
                <li>
                    <a href="/books/1">Books</a>
                </li>
                <li>
                    <a href="#">Contact</a>
                </li>

                <sec:authorize access="isAuthenticated()">
                    <sec:authorize access="hasRole('ROLE_ADMIN')">
                        <li>
                            <a href="/admin/panel">Admin Panel</a>
                        </li>
                    </sec:authorize>
                    <li>
                        <a href="/order">My Orders</a>
                    </li>
                    <li>
                        <a href="/j_spring_security_logout">Logout</a>
                    </li>
                </sec:authorize>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>

</body>
</html>
